<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%@ taglib prefix="sj" uri="/struts-jquery-tags"%>
<%@ taglib prefix="sb" uri="/struts-bootstrap-tags"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<sb:head />
<s:include value="/WEB-INF/content/common/header.jsp"></s:include>
</head>

<body class="bg">
	<s:include value="/WEB-INF/content/common/title-head.jsp"></s:include>

	<div class="content">
		<s:include value="/WEB-INF/content/common/tab.jsp"></s:include>
		<script>
			$("#systemUserTab").addClass("active");
		</script>
		<div class="body">
			<div class="row">
				<div class="span10">
					<div class="title">
						<h2>
							<s:text name="page.heading.list" />
						</h2>
					</div>
					<div class="create-area right">
						<s:url action="add" namespace="/systemUser" var="systemUserAddUrl" />
						<s:a href="%{#systemUserAddUrl}"
							cssClass="btn btn-mini btn-primary" targets="targetDiv">
							<s:text name="global.add" />
						</s:a>
					</div>
					<s:actionerror />
					<table class="table table-striped">
						<thead>
							<tr>
								<th><s:text name="" /></th>
								<th><s:text name="user.name" /></th>
								<th><s:text name="user.email" /></th>
								<th></th>
							</tr>
						</thead>
						<tbody>
							<s:iterator value="pager.list" status="rowIndex">
								<s:url var="viewUserUrl" action="view" namespace="/systemUser"
									includeParams="none">
									<s:param name="id" value="%{id}" />
								</s:url>
								<s:url var="editUserUrl" action="edit" namespace="/systemUser"
									includeParams="none" escapeAmp="false">
									<s:param name="id" value="%{id}" />
								</s:url>
								<s:url var="deleteUserUrl" action="delete"
									namespace="/systemUser" includeParams="none" escapeAmp="false">
									<s:param name="id" value="%{id}" />
								</s:url>
								<s:url var="switchUserUrl" action="switchUser"
									namespace="/systemUser" includeParams="none" escapeAmp="false">
									<s:param name="userId" value="%{id}" />
								</s:url>
								<tr>
									<td><s:property value="%{#rowIndex.index + 1}" />
									<td><s:a href="%{#viewUserUrl}">
											<s:property value="name" />
										</s:a></td>
									<td><s:property value="email" /></td>
									<td><s:a href="%{#switchUserUrl}"
											cssClass="btn btn-mini btn-primary">
											<s:property value="%{getText('switch.to.user')}" />
										</s:a> <s:a href="%{#editUserUrl}"
											cssClass="btn btn-mini btn-primary">
											<s:property value="%{getText('global.edit')}" />
										</s:a> <s:a href="%{#deleteUserUrl}"
											onclick="return confirmDelete()"
											cssClass="btn btn-mini btn-warning">
											<s:property value="%{getText('global.delete')}" />
										</s:a></td>
								</tr>
							</s:iterator>
						</tbody>
					</table>
					<s:include value="/WEB-INF/content/common/pager.jsp"></s:include>
				</div>
			</div>
		</div>
	</div>
	<div id="footer">
		<s:include value="/WEB-INF/content/common/footer.jsp"></s:include>
	</div>
</body>
</html>